﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.BaseData.Infrastructure.Migrations
{
    public partial class _1223 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "BreedingInfo",
                columns: table => new
                {
                    BreedId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Variety = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Source = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FeedingDay = table.Column<int>(type: "int", nullable: false),
                    Brand = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Principal = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LeaveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BreedingInfo", x => x.BreedId);
                });

            migrationBuilder.CreateTable(
                name: "Butcher_EterpriseInfo",
                columns: table => new
                {
                    ButpriseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CompanyName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CompanyAddr = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SetTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CompanyIntro = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterpriseImg = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Butcher_EterpriseInfo", x => x.ButpriseId);
                });

            migrationBuilder.CreateTable(
                name: "ButcherInfo",
                columns: table => new
                {
                    ButcherId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Factor = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ArriveTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ButcherTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ZizhiImg = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ButcherInfo", x => x.ButcherId);
                });

            migrationBuilder.CreateTable(
                name: "EterpriseInfo",
                columns: table => new
                {
                    EterId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Farm = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EterName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    StoreNum = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EterpriseInfo", x => x.EterId);
                });

            migrationBuilder.CreateTable(
                name: "GoodsInfo",
                columns: table => new
                {
                    GoodsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Gid = table.Column<int>(type: "int", nullable: false),
                    Production = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Expiration = table.Column<int>(type: "int", nullable: false),
                    ProductionNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionHome = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Img = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsInfo", x => x.GoodsId);
                });

            migrationBuilder.CreateTable(
                name: "GoodsType",
                columns: table => new
                {
                    GTid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GTName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsType", x => x.GTid);
                });

            migrationBuilder.CreateTable(
                name: "HealthInfo",
                columns: table => new
                {
                    HealthId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FeedDay = table.Column<int>(type: "int", nullable: false),
                    HealthType = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HealthWay = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Isdelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HealthInfo", x => x.HealthId);
                });

            migrationBuilder.CreateTable(
                name: "Process_EnterpriseInfo",
                columns: table => new
                {
                    ProcessEnterId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Team = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Process_EnterpriseInfo", x => x.ProcessEnterId);
                });

            migrationBuilder.CreateTable(
                name: "Process_ProviderInfo",
                columns: table => new
                {
                    ProvideId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProvideProd = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProvideType = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Process_ProviderInfo", x => x.ProvideId);
                });

            migrationBuilder.CreateTable(
                name: "PublicImg",
                columns: table => new
                {
                    ImgId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Production = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TestImg = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FoodImg = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PublicImg", x => x.ImgId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BreedingInfo");

            migrationBuilder.DropTable(
                name: "Butcher_EterpriseInfo");

            migrationBuilder.DropTable(
                name: "ButcherInfo");

            migrationBuilder.DropTable(
                name: "EterpriseInfo");

            migrationBuilder.DropTable(
                name: "GoodsInfo");

            migrationBuilder.DropTable(
                name: "GoodsType");

            migrationBuilder.DropTable(
                name: "HealthInfo");

            migrationBuilder.DropTable(
                name: "Process_EnterpriseInfo");

            migrationBuilder.DropTable(
                name: "Process_ProviderInfo");

            migrationBuilder.DropTable(
                name: "PublicImg");
        }
    }
}
